package com.jy.api.signUpReq.admin;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotNull;

/**
 * Created by lihu on 2018/1/19.
 */
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class StorePrintConfigUpdateReq {
    @NotNull(message = "参数错误！")
    private String storeId;
    //小票自动打印
    private String receiptAuto;
    //交班小票分类打印
    private String receiptType;
    //是否允许标签打印
    private boolean allowLabel;
    //标签打印机id
    private String labelPrintId;
    //小票打印机id
    private String receiptPrintId;
    //厨房打印Ip
    private String kitchenIp;
    //厨房打印端口
    private String kitchenPort;
    //厨房默认打印份数
    private int kitchenAmount;
    //订单提示音
    private String audio;
    //支付到账音量大小
    private int paidVolume;
    //订单提示音量大小
    private int orderVolume;
    //下机播报音量大小
    private int shutdownVolume;

    public String getReceiptAuto() {
        return covert(receiptAuto);
    }

    public String getReceiptType() {
        return covert(receiptType);
    }

    public String getLabelPrintId() {
        return covert(labelPrintId);
    }

    public String getReceiptPrintId() {
        return covert(receiptPrintId);
    }

    public String getKitchenIp() {
        return covert(kitchenIp);
    }

    public String getKitchenPort() {
        return covert(kitchenPort);
    }

    public String getAudio() {
        return covert(audio);
    }

    private String covert(String str) {
        return (org.springframework.util.StringUtils.isEmpty(str) || "null".equalsIgnoreCase(str)) ? null : str;
    }

    public String getStoreId() {
        return storeId;
    }

    public boolean isAllowLabel() {
        return allowLabel;
    }

    public int getKitchenAmount() {
        return kitchenAmount;
    }

    public int getPaidVolume() {
        return paidVolume;
    }

    public int getOrderVolume() {
        return orderVolume;
    }

    public int getShutdownVolume() {
        return shutdownVolume;
    }
}
